<div class="yiiForm">
<?php
	echo EHtml::form();	
	EHtml::setOptions(array('errorElement'=> 'span',));		
?>
<div>注：<span class="required">*</span>为必填项</div>
<div id="leftaa">
<div class="simple">
<?php echo CHtml::activeLabelEx($model,'name'); ?>
<?php echo EHtml::activeTextField($model,'name',array('size'=>8,'maxlength'=>7));?>
</div>
<div class="simple1">
<?php echo CHtml::activeLabelEx($model,'household_register'); ?>
<?php echo EHtml::activeTextField($model,'household_register',array('size'=>8,'maxlength'=>8,)); ?>
</div>
<div class="simple">
<?php echo CHtml::activeLabelEx($model,'sex'); ?>
男<?php echo CHtml::activeRadioButton($model,'sex',array('value'=>0,'checked'=>'checked'));?>
女<?php echo CHtml::activeRadioButton($model,'sex',array('value'=>1));?>
</div>
<div class="simple1">
<?php echo CHtml::activeLabelEx($model,'birthday'); ?>
<?php echo EHtml::activeTextField($model,'birthday',array('size'=>8,'maxlength'=>10,'id'=>"birthday",)); ?>
<?php $this->widget('application.extensions.calendar.SCalendar',array('inputField'=>'birthday','ifFormat'=>'%Y-%m-%d',));?>
</div>
<div class="simple">
<?php echo CHtml::activeLabelEx($model,'card_id'); ?>
<?php echo EHtml::activeTextField($model,'card_id',array('size'=>18,'maxlength'=>18)); ?>
</div>
<div class="simple1">
<?php echo CHtml::activeLabelEx($model,'archive_id'); ?>
<?php echo EHtml::activeTextField($model,'archive_id',array('size'=>18,'maxlength'=>18)); ?>
</div>
<div class="simple">
<?php echo CHtml::activeLabelEx($model,'dl_id'); ?>
<?php echo EHtml::activeTextField($model,'dl_id',array('size'=>18,'maxlength'=>18)); ?>
</div>

<div class="simple1">
<?php echo CHtml::activeLabelEx($model,'car_type'); ?>
<?php echo EHtml::activeTextField($model,'car_type',array('size'=>8,'maxlength'=>10)); ?>

</div>
</div>
  <div id="rightaa">
<div class="simple">
<?php echo CHtml::activeLabelEx($model,'dl_approve_date'); ?>
<?php echo EHtml::activeTextField($model,'dl_approve_date',array('size'=>8,'maxlength'=>10,"id"=>"dl_approve_date",)); ?>
<?php $this->widget('application.extensions.calendar.SCalendar',array('inputField'=>'dl_approve_date','ifFormat'=>'%Y-%m-%d',));?>
</div>
<div class="simple1">
<?php echo CHtml::activeLabelEx($model,'di_valid_date'); ?>
<?php echo EHtml::activeTextField($model,'di_valid_date',array('size'=>8,'maxlength'=>10,"id"=>"di_valid_date",)); ?>
<?php $this->widget('application.extensions.calendar.SCalendar',array('inputField'=>'di_valid_date','ifFormat'=>'%Y-%m-%d',));?>
</div>

<div class="simple">
<?php echo CHtml::activeLabelEx($model,'dl_Annual_date'); ?>
<?php echo EHtml::activeTextField($model,'dl_Annual_date',array('size'=>8,'maxlength'=>10,"id"=>"dl_Annual_date",)); ?>
<?php $this->widget('application.extensions.calendar.SCalendar',array('inputField'=>'dl_Annual_date','ifFormat'=>'%Y-%m-%d',));?>
</div>
<div class="simple1">
<?php echo CHtml::activeLabelEx($model,'home_tel'); ?>
<?php echo EHtml::activeTextField($model,'home_tel',array('size'=>13,'maxlength'=>16)); ?>
</div>
<div class="simple">
<?php echo CHtml::activeLabelEx($model,'home_addr'); ?>
<?php echo EHtml::activeTextField($model,'home_addr',array('size'=>25,'maxlength'=>30)); ?>
</div>
<div class="simple1">
<?php echo CHtml::activeLabelEx($model,'entry_time'); ?>
<?php echo EHtml::activeTextField($model,'entry_time',array('size'=>8,'maxlength'=>10,"id"=>"entry_time",)); ?>
<?php $this->widget('application.extensions.calendar.SCalendar',array('inputField'=>'entry_time','ifFormat'=>'%Y-%m-%d',));?>
</div>
<div class="simple">
<?php echo CHtml::activeLabelEx($model,'mobile_no'); ?>
<?php echo EHtml::activeTextField($model,'mobile_no',array('size'=>13,'maxlength'=>12)); ?>
</div>
<div class="simple1">
<?php echo ""?>
</div>
</div>
<div class="simple2">
<?php 
$bUrl=Yii::app()->baseUrl;
$params=Yii::app()->params;
echo CHtml::tag('img',array('id'=>'driverPhoto','width'=>'120','height'=>'150','src'=>$bUrl.($model->pic_path!=null&&$model->pic_path!=''?$model->pic_path:$params['no_photo_path'])));
echo CHtml::activeHiddenField($model,'pic_path',array('id'=>'pic_path',));
$this->widget('application.extensions.uploadify.EuploadifyWidget', 
    array(
        'name'=>'uploadme',
        'options'=> array(
            'script' => $params['uploadFile']['driverPhotoScript'], 
            'multi' => false,
            'folder' => $params['uploadFile']['tmpPath'],
            'width' => 80,
    		'height' => 25,
    		'auto' => true,
    		'sizeLimit'=>$params['uploadFile']['driverPhotoSize'],//200k
    		'img_id'=>'driverPhoto',//预览图片的id
    		'text_id'=>'pic_path',//存储图片的路径
    		'file_type'=>$params['uploadFile']['driverPhotoExt'],
            ),
    )); 
echo CHtml::button('删除图片',array('onclick'=>"document.getElementById('driverPhoto').src='".$bUrl.$params['no_photo_path']."';document.getElementById('pic_path').value='';"));    
?>
</div>
<div class="simple4">
<?php echo CHtml::activeLabelEx($model,'incentive'); ?>
<?php echo EHtml::activeTextArea($model,'incentive',array('rows'=>6, 'cols'=>65)); ?>
</div>
<div class="simple4">
<?php echo CHtml::activeLabelEx($model,'accident_rec'); ?>
<?php echo EHtml::activeTextArea($model,'accident_rec',array('rows'=>6, 'cols'=>65)); ?>
</div>
<div class="action">
<?php echo CHtml::submitButton($update ? '更新信息' : '添加信息'); ?>
</div>
<?php echo EHtml::endForm(); ?>
<!-- yiiForm -->
</div>
<?php 
if($model->hasErrors()) echo "<script>alert('您填写的信息有误！请根据页面红色图标提示修改。');</script>";
?>